package cn.wolfcode.trip.base.service;

import cn.wolfcode.trip.base.domain.News;
import cn.wolfcode.trip.base.query.NewsQueryObject;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author 不出bug- 么么哒
 * @DESCRIPTION
 * @create 2018/11/13
 */
public interface INewsService {
    void saveOrUpdate(News entity);

    void delete(Long id);

    PageInfo<News> query(NewsQueryObject qo);

    String getContentById(Long id);

    News getNewsById(Long id);

    List<News> getRecommendNewesByType(Integer type, Long newsId);

    void insertRelation(Long newsesId, Long userId);

    void deleteRelation(Long newsId, Long userId);

    List<News> selectByUserId(Long userId);
}
